#include "include.h"
#include "service/timer.h"

#include "compile/debug_memoryleaks"
using namespace service;
using namespace boost;

Timer::Timer(void)
{
	reset();
}

Timer::~Timer(void)
{
}

void Timer::reset()
{
	globalTimer.restart();
	frameTimer.restart();
	frame_count = 0;
	lastframe_time = 0;
}


double  Timer::tick()
{
	lastframe_time = frameTimer.elapsed();
	frameTimer.restart();
	++frame_count;

	return lastframe_time;
}

